package com.rent.writeoff.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 核销明细表
 */
@Data
@TableName("write_off_detail")
@ApiModel(value = "核销明细", description = "记录每笔核销关联关系的实体类")
public class WriteOffDetail {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID", example = "1")
    private Long id;

    /**
     * 关联银行收款表ID
     */
    @TableField("receipt_id")
    @ApiModelProperty(value = "关联银行收款表ID", example = "1", required = true)
    private Long receiptId;

    /**
     * 关联租金计划表ID
     */
    @TableField("rent_plan_id")
    @ApiModelProperty(value = "关联租金计划表ID", example = "1", required = true)
    private Long rentPlanId;

    /**
     * 本次核销本金
     */
    @TableField("write_off_principal")
    @ApiModelProperty(value = "本次核销本金", example = "5000.00")
    private BigDecimal writeOffPrincipal;

    /**
     * 本次核销利息
     */
    @TableField("write_off_interest")
    @ApiModelProperty(value = "本次核销利息", example = "1000.00")
    private BigDecimal writeOffInterest;

    /**
     * 核销时间
     */
    @TableField("write_off_time")
    @ApiModelProperty(value = "核销时间", example = "2025-10-20 10:00:00")
    private LocalDateTime writeOffTime;

    /**
     * 处理线程名
     */
    @TableField("thread_name")
    @ApiModelProperty(value = "处理线程名", example = "write-off-thread-1")
    private String threadName;
}
